import { Component, OnInit, Input } from '@angular/core';
import { FormGroupDirective, FormGroup, ControlContainer, FormControl } from '@angular/forms';
import { MAT_CHECKBOX_CLICK_ACTION } from '@angular/material';

@Component({
  selector: 'm-password-strength',
  templateUrl: './password-strength.component.html',
  styleUrls: ['./password-strength.component.scss'],
  providers: [{ provide: MAT_CHECKBOX_CLICK_ACTION, useValue: 'check' }],
})
export class PasswordStrengthComponent implements OnInit {
  constructor(private controlContainer: ControlContainer) {}
  formGroup: FormGroup;
  ngOnInit() {
    this.formGroup = this.controlContainer.control as FormGroup;
  }

  formatLabel(value: number) {
    return `${value}位`;
  }
}
